package ltd.dujiabao.springcloud.service;

import org.springframework.stereotype.Service;

/**
 * @author : DuJiabao
 * @Project : springcloud
 * @Time : 2021/5/22 19:02
 * @Desc :
 */
@Service
public class PaymentService {
  public String runsWell(Integer id) {
    return "一切正常，线程号：" + Thread.currentThread().getName() + ", id：" + id;
  }

  public String runsTimeOut(Integer id) {
    try {
      Thread.sleep(3000);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    return "执行超时，线程号：" + Thread.currentThread().getName() + ", id：" + id;
  }
}
